<template>
  <van-tabs sticky >
    <van-tab title="同城">
      <nearby/>
    </van-tab>
    <van-tab title="在线">
      <online/>
      </van-tab>
  </van-tabs>
</template>

<script>
import nearby from './recommend/Nearby.vue'
import online from './recommend/Online.vue'
import { near } from '../api'
import { ref, onMounted, reactive } from 'vue';

export default {
  setup() {
    const active = ref(2);
    /* onMounted( async ()=> {
      const userId = ref(localStorage.getItem('userId'))
      console.log(userId)
      const res = await near(userId)
      console.log(res)
    }) */

    return { 
      active,
      // onMounted
    };
  },
  components: {
        nearby,
        online,
        
    }
};
</script>

<style>
</style>